# -*- coding: utf-8 -*-
# @Time    : 2019/10/12 20:23
# @Author  : LiHaowen
# @Email   : lihaowen2017@163.com
# @File    : all_is_object.py


def ask(name="lihaowen"):
    print(name)


class Person:
    def __init__(self):
        print("lihaowen")


# my_func = ask
# my_func("good")
#
# my_class = Person
# my_class()

obj_list = [ask, Person]
for item in obj_list:
    print(item())
"""
lihaowen ：调用函数
None : 函数返回值为空
lihaowen ： 类的init方法
<__main__.Person object at 0x000002054BE666A0> ：类的对象
"""


def decorator_func():
    print("dec start")
    return ask


my_ask = decorator_func()  # 为ask
my_ask("tom")

# print(my_ask())